package com.sts.sink.model;

import com.sts.sink.StsSink;
import com.sts.sink.impl.TextSinkImpl;
import com.sts.source.StsSource;
import com.sts.task.StsTask;
import lombok.Getter;
import lombok.Setter;

/**
 * @author lsl
 * @since 2025年06月28日 13:44
 */
@Getter
@Setter
public class TextSinkConfig extends BaseSinkConfig {

    private String filePath;
    private String fieldSeparator = ",";

    public TextSinkConfig(String filePath) {
        this.filePath = filePath;
    }

    public TextSinkConfig(String filePath, String fieldSeparator) {
        this.filePath = filePath;
        this.fieldSeparator = fieldSeparator;
    }

    @Override
    public StsSink buildImpl(StsSource stsSource, StsTask stsTask) {
        return new TextSinkImpl(stsSource, this, stsTask);
    }
}
